package xmls

var UserDetailsMapper = []byte(`<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "https://raw.githubusercontent.com/zhuxiujia/GoMybatis/master/mybatis-3-mapper.dtd">
<mapper>
    <!--logic_enable 逻辑删除字段-->
    <!--logic_deleted 逻辑删除已删除字段-->
    <!--logic_undelete 逻辑删除 未删除字段-->
    <!--version_enable 乐观锁版本字段,支持int,int8,int16,int32,int64-->
    <resultMap id="BaseResultMap" tables="t_user_details">
      <id column="id" langType="int"/>
	  <result column="nick_name" langType="string"   />
	  <result column="user_id" langType="int"   />
	  <result column="user_sex" langType="string"   />
	  <result column="user_tel" langType="string"   />
	  <result column="user_detail" langType="string"   />
	  <result column="user_birth" langType="Time"   />
	  <result column="create_by" langType="string"   />
	  <result column="create_time" langType="Time"   />
	  <result column="update_by" langType="string"   />
	  <result column="update_time" langType="Time"   />
	  <result column="is_delete" langType="int"  logic_enable="true" logic_undelete="0" logic_deleted="1" />
    </resultMap>
	<insert id="InsertByUserDetail">
		insert into t_user_details(user_id,create_by,update_by) values (#{id},'root','root')
	</insert>
	<update id="UpdateByUserInfo">
		update t_user_details set nick_name = #{nick_name},user_sex=#{user_sex},
		user_tel= #{user_tel},user_detail=#{user_detail},user_birth=#{user_birth},
		update_by=#{update_by} ,update_time= current_timestamp where user_id =#{user_id}
	</update>
</mapper>`)
